package slyumfx;

import include.Constants;
import java.io.File;
import java.io.IOException;
import java.util.Locale;
import java.util.ResourceBundle;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.SceneBuilder;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
 
public class SlyumFX extends Application
{
 
  public static void main(String[] args)
  {
    launch(args);
  }
  
  public static void exit()
  {
    Platform.exit();
  }

  @Override
  public void start(Stage stage) throws IOException
  {
    stage.setTitle(Constants.APPLICATION_TITLE);

    Parent root = FXMLLoader.load(getClass().getResource(".." + File.separator + Constants.FXML_DEFAULT_PATH),
                                  ResourceBundle.getBundle(Constants.FXML_DEFAULT_PROPERTIES_PATH, Locale.FRANCE));
    
    stage.setScene(SceneBuilder.create().root(root).width(1200).height(900).fill(Color.LIGHTGRAY).stylesheets(Constants.DEFAULT_CSS).build());

    stage.show();
  }
}